{extend name='public/content'}

{block name="title"}
	我的积分排行
{/block}

{block name="body"}
<div ng-app="myApp" ng-controller="myCtrl"> 
	<div class="layui-container"> 
	 
	  <div class="layui-row" ng-repeat="x in data">
	    <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
	    	{{x.storname.title}}
	    </div>
	    <div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
	  		该店铺总积分：{{x.count}}
	    </div>
	    <div class="layui-col-xs4 layui-col-sm12 layui-col-md4">
	   		{{x.storname.address}}
	    </div>
	    <div class="layui-col-xs4 layui-col-sm7 layui-col-md8">
	    
	    </div>
	    <div class="layui-col-xs4 layui-col-sm5 layui-col-md4">
	  
	    </div>

	  </div>
	</div>

	<div><a href="{:url('user/')}"></a></div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
	require(['jquery','angular'], function () { 
		angular.module('myApp', [])
			.service('$factory',function($http){
				var locg={
		   			serch:function($type,$page,call){
		   				var url ="{:url('user/mypointmendianapi')}?page="+$page+"&type="+$type;
	                 	$http.get(url,{}).then(function(res){call(res)})	
		   			}
		   		}
		   		return locg;
			})
			.controller('myCtrl', function($scope, $http,$factory) {
				$factory.serch(2,0,function(data){
					$scope.data=data.data;
					console.log($scope.data);
				})
			})
			.filter('trustHtml', function ($sce) {
		        return function (input) {
		            return $sce.trustAsHtml(input);
		        }
		    });



	})
</script>
{/block}

{block name="style"}
 <style type="text/css">
 	
 </style>
{/block}